﻿namespace System
{
    /// <summary>
    /// UIntPtr扩展类
    /// </summary>
    public static class UIntPtrEx
    {

        /// <summary>
        /// UIntPtr相加
        /// </summary>
        /// <param name="a">第一个操作数</param>
        /// <param name="b">第二个操作数</param>
        /// <returns>结果</returns>
        public static UIntPtr Add(UIntPtr a, UIntPtr b)
        {
            return new UIntPtr((ulong)a + (ulong)b);
        }

        /// <summary>
        /// UIntPtr相减
        /// </summary>
        /// <param name="a">第一个操作数</param>
        /// <param name="b">第二个操作数</param>
        /// <returns>结果</returns>
        public static UIntPtr Subtract(UIntPtr a, UIntPtr b)
        {
            return new UIntPtr((ulong)a - (ulong)b);
        }

        /// <summary>
        /// UIntPtr相乘
        /// </summary>
        /// <param name="a">第一个操作数</param>
        /// <param name="b">第二个操作数</param>
        /// <returns>结果</returns>
        public static UIntPtr Multiply(UIntPtr a, UIntPtr b)
        {
            return new UIntPtr((ulong)a * (ulong)b);
        }

        /// <summary>
        /// UIntPtr相除
        /// </summary>
        /// <param name="a">第一个操作数</param>
        /// <param name="b">第二个操作数</param>
        /// <returns>结果</returns>
        public static UIntPtr Divide(UIntPtr a, UIntPtr b)
        {
            return new UIntPtr((ulong)a / (ulong)b);
        }


    }

  
}
